package com.adv.util;

import java.io.Closeable;
import java.io.IOException;

public class CloseUtils {

	public static void close(Closeable cl) {
		if (null != cl) {
			try {
				cl.close();
			} catch (IOException e) {
				e.printStackTrace();
			}
		}
	}

	public static void close(Closeable... cls) {
		if (cls.length > 0) {
			for (Closeable cl : cls) {
				if (null != cl) {
					try {
						cl.close();
					} catch (IOException e) {
						e.printStackTrace();
					}
				}
			}
		}
	}

}
